package com.grades.springboot.mapper;

import com.grades.springboot.entity.Admin;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Component
public interface AdminMapper {

    @Select("select *from admin where id=#{id}")
    Admin selectById(Integer id);

    @Select("select *from admin where email=#{email}")
    Admin selectByEmail(String email);

    @Update("update admin set password=#{password} where email=#{email}")
    int updatePassword(String email,String password);
}
